
package edu.uwosh.cs342.group5;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class PlaceDetails extends Activity{
	Button back;
	TextView title;
	String name = null;
	String rating = null;
	String url = null;
	String icon = null;
	String website = null;
	String formated_address = null;
	String formated_phone_number = null;
	float lat;
	float lng;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.placedetails);
		back = (Button) findViewById(R.id.button1);
		title = (TextView) findViewById(R.id.textView1);
		
		SharedPreferences app_preferences = PreferenceManager
				.getDefaultSharedPreferences(this);
		name = app_preferences.getString("name", "No Item");
		rating = app_preferences.getString("rating", "No Rating");
		url = app_preferences.getString("url", "No URL");
		icon = app_preferences.getString("icon", "No Icon");
		website = app_preferences.getString("website", "No Website");
		formated_address = app_preferences.getString("formated_address", "No Address Listed");
		formated_phone_number = app_preferences.getString("formated_phone_number", "No Phone Number Listed");
		lat = app_preferences.getFloat("lat", -1);
		lng = app_preferences.getFloat("lng", -1);
		
		
		
	}
	
	public void directions(View view) {
		SharedPreferences app_preferences = PreferenceManager
				.getDefaultSharedPreferences(this);
		
		SharedPreferences.Editor editor = app_preferences.edit();
		editor.putBoolean("directionsOn", true);
	}

}
